package com.example.demo.test005;

import org.springframework.core.io.ClassPathResource;

import java.io.*;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.file.Path;
import java.nio.file.Paths;

/**
 * s
 *
 * @author ws
 * @since 2023-12-19
 */
public class PathUtils {
    public static void main(String[] args) {
        // 获取a.txt文件的路径
//        String path = PathUtils.class.getResource("cfg/a.txt)").getPath();
        ClassPathResource resource = new ClassPathResource("font/a.txt");
        System.out.println(resource.getPath());
    }


}
